<template>
  <div class="model-use-2">
    <div>Parent bound v-model is: {{ modelValue }}</div>
    <div>Parent bound v-model:flag is: {{ dialogFlag }}</div>
    <button @click="updateCount">Increment</button>
    <button @click="updateFlag">改变flag</button>
  </div>
</template>
<script setup lang="ts">
const props = defineProps(['modelValue', 'dialogFlag'])
const emits = defineEmits(['update:modelValue', 'update:dialogFlag'])
const updateCount = () => {
  emits('update:modelValue', props.modelValue + 1)
}
const updateFlag = () => {
  emits('update:dialogFlag', !props.dialogFlag)
}
</script>
<style scoped>

</style>
